Type.registerNamespace("BM");

// LabelValueHandler object

BM.LabelValueHandler = function(leafItem) {
    BM.LabelValueHandler.initializeBase(this, [leafItem]);
}

BM.LabelValueHandler.prototype = {
    getHiddenInput: function() {
        /// <returns domElement="true" >
        /// the hidden input for keeping the data
        /// </returns>
        return $(this.getLeafNode()).children('.HiddenInput')[0];
    },

    getEditModeValue: function() {
        return this.getHiddenInput().value;
    },

    setEditModeValue: function(value) {
        this.getHiddenInput().value = value;
        this.getInput().innerHTML = value;        
        this.leafItem.raiseChanged();
    }
}

BM.ValueHandler['LabelValueHandler'] = BM.LabelValueHandler;
BM.LabelValueHandler.registerClass("BM.LabelValueHandler", BM.ValueHandler);